<?php
$user=new Users;
?>
<div class="detailContent-title">
    <?php if(isset($this->breadcrumbs)):?>
        <?php $this->widget('zii.widgets.CBreadcrumbs', array(
        'htmlOptions'=>array('class'=>'local'),
        'separator'=>'&nbsp;&gt;&nbsp;',
        'links'=>array(
            '会员登录',
        ),
        'homeLink'=>'当前位置：首页',
        'tagName'=>'span',
    )); ?><!-- breadcrumbs -->
    <?php endif?>
</div>

<!--会员登录-->
<form method="post" action="/index.php?r=site/login">
    <div class="hy-content" style="border: 1px solid #c0c0c0; height: 230px;">
        <table width="100%" border="0" cellpadding="15" cellspacing="0" class="login">
            <tr><td width="20%"></td><td width="60%"></td></tr>
            <tr>
                <td width="20%" align="right" valign="middle">会员名：</td>
                <td width="60%">
                    <?php echo CHtml::activeTextField($user,'username',array('class'=>"text155")) ?>
                    <span class="note">注册时启用的个人、单位会员名称;或电子邮箱;或会员注册后获取的注册号。</span>
                </td>
            </tr>
            <tr>
                <td align="right" valign="middle">密&nbsp;&nbsp;码：</td>
                <td>
                    <?php echo CHtml::activePasswordField($user,'password',array('class'=>"text155")) ?>
                </td>
            </tr>
            <tr>
                <td align="right" valign="middle">验证码：</td>
                <td>
                    <input id="Users_verifyCode" name="Users[verifyCode]" type="text" class="text70" id="yzm" />
                    <img alt="" src="/index.php?r=site/captcha" id="yzm" />
                </td>
            </tr>

        </table>
        <div class="button"><input type="submit" style="font-size: 0;border: 0;" id="login"></input></div>

    </div>
</form>

<script type="text/javascript">
    /*<![CDATA[*/
    jQuery(function($) {
        jQuery('#yzm').after("<span class=\"black\"><a id=\"yw0_button\" href=\"\/index.php?r=site\/captcha&amp;refresh=1\">换一张<\/a><\/span>");
        jQuery('#yw0_button').live('click',function(){
            jQuery.ajax({
                url: "\/index.php?r=site\/captcha&refresh=1",
                dataType: 'json',
                cache: false,
                success: function(data) {
                    jQuery('#yzm').attr('src', data['url']);
                    jQuery('body').data('captcha.hash', [data['hash1'], data['hash2']]);
                }
            });
            return false;
        });
    });
    /*]]>*/
</script>
